package com.cyan.app.workflow.util;

/**
 * Created by DXW on 2015/11/19.
 */
public class RuntimeContext {

    // intent的extra中作为key, 保存跳转源，从A跳到B，则源为A。值为每个Activity的TAG
    // infoc 的 frm字段
    public static final String FROM = "from_tag";

    // 离开activity的原因, infoc的close字段
    public static final byte CLOSE_REASON_BACK = 1;
    public static final byte CLOSE_REASON_HOME = 2;
    public static final byte CLOSE_REASON_POSITIVE_BTN = 3; // 提交、确定等按钮
    public static final byte CLOSE_REASON_OTHER = 4;


    private static final RuntimeContext singleInstance = new RuntimeContext();

    private byte mSource;

    public static RuntimeContext getInstance() {
        return singleInstance;
    }

    public byte getSource() {
        return mSource;
    }

    public void setSource(byte mSource) {
        this.mSource = mSource;
    }
}
